package com.gavindon.android.repo

import com.gavindon.android.base.BaseRepository
import com.gavindon.android.entity.CourseDetailResp
import com.gavindon.android.entity.VideoDetail
import com.gavindon.android.entity.VideoTreeResp
import com.gavindon.android.network.DataResult

/**
 * description:
 * Created by liNan on  2022-2-6 10:30
 */
class VideoRepo : BaseRepository() {

    suspend fun getLessonId(courseId: String): DataResult<List<VideoTreeResp>> {
        return launchRequest {
            service.courseCatalogTree(courseId)
        }
    }

    suspend fun getLessonDetail(courseId: String): DataResult<VideoDetail> {
        return launchRequest {
            service.clientCourse(courseId)
        }
    }

    /*获取课程信息*/
    suspend fun getCourseDetail(courseId: String): DataResult<CourseDetailResp> {
        return launchRequest {
            service.clientCourseDetail(courseId)
        }
    }

 /*   *//*获取课程信息*//*
    suspend fun getCourseLst(courseId: String): DataResult<List<VideoTreeResp>> {
        return launchRequest {
            service.clientCourseClassLst(courseId)
        }
    }*/
}